package com.xl.xlservice.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.xl.xlservice.model.ResultData;
import com.xl.xlservice.model.User;
import java.util.List;

public class GlobalException {

    // Block 异常处理函数，参数最后多一个 BlockException，其余与原函数一致.
    public static ResultData<List<User>> handleException(User user, BlockException be){
        // user和be可以自行打印日志或返回
        return new ResultData<List<User>>().buildResultData(-1,"系统繁忙",null,0);
    }
}
